package com.xyz.dao.logic;

import com.free.ext.mybatis.model.entity.PageResponseModel;
import com.xyz.dao.dao.CCustomerfundDao;
import com.xyz.domain.table.CCustomerfund;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class CCustomerfundLogic {

    @Autowired
    private CCustomerfundDao cCustomerfundDao;

    public CCustomerfund add(CCustomerfund cCustomerfund){
        return cCustomerfundDao.insert(cCustomerfund);
    }

    public Integer update(CCustomerfund customerfund){
        return cCustomerfundDao.update(customerfund);
    }

    public Integer udpCustomerFund(CCustomerfund fund){
        return cCustomerfundDao.udpCustomerFund(fund);
    }

    public List<CCustomerfund> list(CCustomerfund customerfund, String orderBy){
        return cCustomerfundDao.selectList(customerfund, orderBy);
    }

    public Integer delete(Integer key){
        return cCustomerfundDao.delete(key);
    }

    public PageResponseModel<CCustomerfund> pageInfo(CCustomerfund customerfund, String orderBy, Integer pageNo, Integer pageSize){
        return cCustomerfundDao.selectByPageNo(customerfund, orderBy, pageNo, pageSize);
    }

}